<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta charset="UTF-8">
    <title th:text="${#session.getAttribute('title')}">Title</title>
    <link th:href="@{/css/user/index.css}" rel="stylesheet" type="text/css" media="screen,print"/>
    <link th:href="@{/css/footer.css}" rel="stylesheet" type="text/css" media="screen,print"/>
    <script th:src="@{/webjs/jquery-1.10.1.min.js}" type="text/javascript"></script>
    <link th:href="@{/webcss/bootstrap.css}" rel="stylesheet" type="text/css" media="screen,print"/>
    <script th:src="@{/webjs/bootstrap.js}" type="text/javascript"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" integrity="sha384-..." crossorigin="anonymous">
</head>
<body>
<div class="container">
    <h1 th:text="${#session.getAttribute('title')}"></h1>
    <h1 th:text="'积分前30名排行榜'"></h1><br>

    <p>
        <span th:text="'欢迎您：'">欢迎您：</span>
        <span th:text="${#session.getAttribute('user').className}" class="highlight-red">未获取到年级</span>——
        <span th:text="${#session.getAttribute('user').realName}+老师" class="highlight-red">未获取到名字</span>
        <span th:text="'，您的积分排名为：'">您的积分排名为：</span>
        <span th:text="${rank}" class="highlight-green">未获取到排名</span>
        <span th:text="'(此处并列排名为准)'">(此处并列排名为准)</span>
    </p>

    <table id="pointsTable">
        <thead>
        <tr>
            <th style="text-align: center">排名</th>
            <th style="text-align: center">姓名</th>
            <th style="text-align: center">积分</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="point,status:${points}">
            <td th:text="${status.count}"></td>
            <td th:text="${point.realName}"></td>
            <td th:text="${point.points}"></td>
        </tr>
        </tbody>
    </table>
</div>
<footer class="footer fixed-bottom">
    <div class="footer-links d-flex justify-content-center">
        <a href="toIndex" class="footer-link active"><i class="fas fa-trophy"></i> 排行榜</a>
        <a href="toRecord" class="footer-link"><i class="fas fa-history"></i> 积分记录</a>
        <a href="toUpdate" class="footer-link"><i class="fas fa-user"></i> 修改密码</a>
    </div>
</footer>
</body>
</html>